#从键盘接收用户的输入字符串， 统计每个字符出现的次数
#统计出现次数最多的字符
str1 = input("输入字符串:")
str2 = ""
max = 0
ch = ""
count = 0
for i in str1:
    if i not in str2:
        str2 = str2 + i
        for j in str1:
            if i == j:
                count = count + 1
        print(i+"出现了"+str(count)+"次")
        if count > max:
            max = count
            ch = i
        count = 0
print("出现次数最多的字符为："+ch)